package cn.DesignModel.simpleFactory;

/**
 * @author: lizemin
 * @version: 1.0
 */
public class SimpleFactory {
    public static final int MUSI = 1;//慕斯蛋糕
    public static final int BIRTHDAY = 2;//生日蛋糕

    public static CakeFactory createCake(int type) {
        switch (type) {
            case MUSI:
                return new MusiCake();
            case BIRTHDAY:
                return new BirthdayCake();
            default:
                return new MusiCake();
        }

    }
}
